import React, { Component } from "react";
import Child from "./Child";

class App extends Component {
  state = {
    f_count: 10,
  };
  fn = () => {
    this.setState({
      f_count: 20,
    });
  };
  render() {
    return (
      <>
        <h2>16.3版本之后的生命周期</h2>
        <button onClick={this.fn}>btn</button>
        <Child f_count={this.state.f_count} />
      </>
    );
  }
}

export default App;
